package com.jet.core.result;

import lombok.Getter;

@Getter
public enum ResultCode {
    /*
    请求返回状态码和说明信息
     */
    SUCCESS(200, "成功"),

    BAD_REQUEST(400, "请求信息错误"),
    NOT_LOGIN(401, "未登录"),//重新登陆
    EXPIRE_LOGIN(402, "登录过期"),//重新登陆
    NOT_ROLE(403, "没有权限访问"),
    NOT_FOUND(404, "资源不存在"),
    COIN_LOCK_REQUEST(405, "已有用户投币，请稍后"),
    REPEAT_REQUEST(406, "不能重复提交"),

    SYSTEM_ERROR(500, "系统异常，请稍后重试"),
    SERVICE_ERROR(501, "服务错误，请稍后重试"),
    ;

    private final int code;
    private final String msg;

    ResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

}
